home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1985 September / 1985-09.d64 / weather prophet (.txt) < prev   
Encoding:
Commodore BASIC  |  1985-01-01  |  12.7 KB  |  351 lines

  1. 20 print"[147]":poke53280,1:poke53281,1:poke198,0
  2. 30 rem if computer is +4, delete "rem" in line 40
  3. 40 rem color 0,2:poke65305,249
  4. 50 dimin$(720),ho%(720),mh(12),ml(12),ar(12),as(12),no%(720),d%(50)
  5. 60 bl$="                                        "
  6. 70 fort=1to12:readmh(t):next:fort=1to12:readml(t):next
  7. 80 fort=1to12:readar(t):next:fort=1to12:readas(t):next
  8. 90 fort=1to8:readdi$(t):next
  9. 100 open15,8,15:open1,8,2,"rc.index,s,r"
  10. 110 input#15,a:ifa=62thengosub240:goto1110
  11. 120 input#1,rc%,tr%,hd$,cd$,mp$,ap$,ms$,as$:gosub240:ifrc%=720thenrc%=0
  12. 130 goto1110
  13. 140 open4,4,7:cmd4:return
  14. 150 print#4:close4:return
  15. 160 print#15,"p"+chr$(2)+chr$(lb)+chr$(hb)+chr$(1):return
  16. 170 hb=int(x1/256):lb=x1-hb*256:return
  17. 180 rc$="":fora=1to100:get#1,a$:rc$=rc$+a$:next:return
  18. 190 print#15,"i0":return
  19. 200 close1:open1,8,2,"wx.data,l,"+chr$(100):return
  20. 210 open15,8,15:gosub190:return
  21. 220 getg$:ifg$=""then220
  22. 230 return
  23. 240 close1:close15:return
  24. 250 mo=0:print"[147][197]nter number of month for report:";:inputmo
  25. 260 yr=0:print"[147][197]nter year for report";:inputyr
  26. 270 ifmo<1ormo>12then250
  27. 280 print"[147]                  [215]ait!!"
  28. 290 hi=0:lo=200:ba=0:ra=0:sn=0:ws=0:de=0:ed=0:rh=0:bl=33:pc=0
  29. 300 print"             [208]reparing [210]eport":gosub210:gosub200
  30. 310 forx1=1totr%:gosub170:g$="":gosub160
  31. 320 fora=1to6:get#1,a$:g$=g$+a$:next
  32. 330 ifyr<>val(mid$(g$,5,2))then360
  33. 340 ifmo=val(mid$(g$,3,2))thengosub630
  34. 350 ifmo<val(mid$(g$,3,2))thenx1=tr%
  35. 360 next:close1:gosub190:close15
  36. 370 iflo=200thenprint"[147][206]o data for this month exists.":goto620
  37. 380 ifpr=1thengosub140
  38. 390 print"[147]  [205]onthly [210]eport for :[146]";mo;"/"yr
  39. 400 print"[206]ormal [200]igh:";mh(mo);:print"   [206]ormal [204]ow:"ml(mo)
  40. 410 print"[206]ormal [210]ain: "ar(mo);:print"  [206]ormal [211]now: "as(mo)
  41. 420 print"[200]ighest [194]arometer reading..."ba:
  42. 430 print"on "mid$(da$(1),3,2)"/"mid$(da$(1),1,2)"/"mid$(da$(1),5,2)
  43. 440 print"[204]owest [194]arometer reading...."bl
  44. 450 print"on "mid$(da$(2),3,2)"/"mid$(da$(2),1,2)"/"mid$(da$(2),5,2)
  45. 460 print"[200]ighest [212]emperature........."hi
  46. 470 print"on "mid$(da$(3),3,2)"/"mid$(da$(3),1,2)"/"mid$(da$(3),5,2)
  47. 480 print"[204]owest [212]emperature.........."lo
  48. 490 print"on "mid$(da$(4),3,2)"/"mid$(da$(4),1,2)"/"mid$(da$(4),5,2)
  49. 500 print"[200]ighest [215]ind "ws" from ";di$(wd)
  50. 510 print"on "mid$(da$(5),3,2)"/"mid$(da$(5),1,2)"/"mid$(da$(5),5,2)
  51. 520 printpc;"[196]ays with precipitation."
  52. 530 print"[205]ost rainfall..............."ra
  53. 540 print"on "mid$(da$(6),3,2)"/"mid$(da$(6),1,2)"/"mid$(da$(6),5,2)
  54. 550 print"[200]eaviest [211]nowfall..........."sn
  55. 560 print"on "mid$(da$(7),3,2)"/"mid$(da$(7),1,2)"/"mid$(da$(7),5,2)
  56. 570 print"[200]ighest [200]umidity............"rh
  57. 580 print"on "mid$(da$(9),3,2)"/"mid$(da$(9),1,2)"/"mid$(da$(9),5,2)
  58. 590 print"[212]otal [200]eating [196]egree [196]ays..."de
  59. 600 print"[212]otal [195]ooling [196]egree [196]ays..."ed
  60. 610 ifpr=1thengosub150
  61. 620 gosub2350:return
  62. 630 gosub160:gosub180
  63. 640 ifba<val(mid$(rc$,7,5))thenba=val(mid$(rc$,7,5)):da$(1)=mid$(rc$,1,6)
  64. 650 ifbl>val(mid$(rc$,7,5))thenbl=val(mid$(rc$,7,5)):da$(2)=mid$(rc$,1,6)
  65. 660 ifhi<val(mid$(rc$,13,3))thenhi=val(mid$(rc$,13,3)):da$(3)=mid$(rc$,1,6)
  66. 670 iflo>val(mid$(rc$,16,3))thenlo=val(mid$(rc$,16,3)):da$(4)=mid$(rc$,1,6)
  67. 680 ifws<val(mid$(rc$,20,3))thenws=val(mid$(rc$,20,3)):wd=val(mid$(rc$,19,1))
  68. 690 ifws=val(mid$(rc$,20,3))thenda$(5)=mid$(rc$,1,6)
  69. 700 ifra<val(mid$(rc$,23,5))thenra=val(mid$(rc$,23,5)):da$(6)=mid$(rc$,1,6)
  70. 710 ifval(mid$(rc$,23,5))<>0thenpc=pc+1
  71. 720 ifsn<val(mid$(rc$,28,4))thensn=val(mid$(rc$,28,4)):da$(7)=mid$(rc$,1,6)
  72. 730 ifrh<val(mid$(rc$,32,3))thenrh=val(mid$(rc$,32,3)):da$(9)=mid$(rc$,1,6)
  73. 740 h=val(mid$(rc$,13,3)):l=val(mid$(rc$,16,3))
  74. 750 tp=65-int((h+l)/2):ifsgn(tp)=-1thentp=int((h+l)/2)-65:goto770
  75. 760 de=de+tp:goto780
  76. 770 ed=ed+tp
  77. 780 return
  78. 790 print"[147]      [211]earching for "mo$"/"da$"/"yr$
  79. 800 gosub210:gosub200:r=0:forpt=1totr%:x1=pt:gosub170:rc$=""
  80. 810 gosub160:rc$="":fora=1to6:get#1,a$:rc$=rc$+a$:next
  81. 820 ifse$=rc$thenr=pt:pt=tr%:rc$=""
  82. 830 next
  83. 840 ifr=0then870
  84. 850 a$="":gosub160:gosub180
  85. 860 gosub240:return
  86. 870 gosub240:print"          [210]ecord not found.":return
  87. 880 f=1:print"[147][211]earch by [198][146]ield or [210][146]ecord number?"
  88. 890 gosub220:ifg$="r"then1060
  89. 900 ifg$<>"f"then890
  90. 910 print"[147][197]nter number of field for search:"
  91. 920 printtab(7)" 1. [146]  [211]pecific [196]ate
  92. 930 [153][163]7)" 2. wait  chr$enerate (NULL)onthly (NULL)eport
  93. 940 printtab(7)" 3. [146]  [210]eturn to [205]ain [205]enu
  94. 950 [141]220:g[178][198](g$)[171]48:[145]g[137]980,250,970
  95. 960 [137]950
  96. 970 [142]
  97. 980 [153]"load               (NULL)earch for str$ate
  98. 990 print"[197]nter date (month, day, year)"
  99. 1000 print"[211]eparate each entry with a comma.":inputmo$,da$,yr$
  100. 1010 ifval(da$)<=9thenda$="0"+da$
  101. 1020 ifval(mo$)<=9thenmo$="0"+mo$
  102. 1030 ifval(yr$)<=9thenyr$="0"+yr$
  103. 1040 se$=da$+mo$+yr$:gosub790:ifr=0thengosub2350:return
  104. 1050 gosub2640:gosub2350:return
  105. 1060 print"[147]":gosub210:gosub200:rc$=""
  106. 1070 print"[210]ecord number for [211]earch?":inputr:ifr>tr%then720
  107. 1080 x1=r:gosub170:gosub160:gosub180:gosub190:gosub240:gosub2640:gosub2350
  108. 1090 return
  109. 1100 gosub240:print"[147][201]nvalid [210]ecord [206]umber":gosub2350:return
  110. 1110 print"":printchr$(14):fl=0:f=0:q=fre(o)
  111. 1120 print"[147]           [215][197][193][212][200][197][210] [208][210][207][208][200][197][212]
  112. 1130 [153]"     1 wait     valnter (NULL)ew str$ata
  113. 1140 print"     2 [146]     [198]orecast
  114. 1150 [153]"     3 wait     (NULL)earch str$ata
  115. 1160 print"     4 [146]     [196]egree [196]ay [210]egister
  116. 1170 [153]"     5 wait     valxit (NULL)rogram
  117. 1180 print"     0 [146]     [212]oggle [208]rinter [207]ption
  118. 1190 [153]"":[153]"     ";tr%;" (NULL)ecords in str$ata peekase.":[153]""
  119. 1200 [139]pr[178]1[167][153]"             (NULL)rinter (NULL)(NULL) "
  120. 1210 [139]pr[178]0[167][153]"             (NULL)rinter (NULL)ascasc "
  121. 1220 [141]220:g[178][197](g$):[145]g[141]1270,3000,880,3150,3280
  122. 1230 [139]g$[178]"0"[167][141]1250
  123. 1240 [137]1110
  124. 1250 [139]pr[178]0[167]pr[178]1:[142]
  125. 1260 [139]pr[178]1[167]pr[178]0:[142]
  126. 1270 [153]"loadvalnter str$ate: (NULL)onth, str$ay, (NULL)ear as 12,31,84"
  127. 1280 [153]"(NULL)eparate each entry with a comma.":[133]mo$,da$,yr$
  128. 1290 [139][197](da$)[179][178]9[167]da$[178]"0"[170]da$
  129. 1300 [139][197](mo$)[179][178]9[167]mo$[178]"0"[170]mo$
  130. 1310 [139][197](yr$)[179][178]9[167]yr$[178]"0"[170]yr$
  131. 1320 [139]rc%[178]0[167]1370
  132. 1330 [141]210:[141]200:x1[178]rc%:[141]170:[141]160
  133. 1340 g$[178]"":[129]a[178]1[164]6:[161]#1,a$:g$[178]g$[170]a$:[130]:[141]240
  134. 1350 [139][202](g$,3,2)[179]mo$[167]mp$[178]"00":ms$[178]"00"
  135. 1360 [139][202](g$,5,2)[179]yr$[167]ap$[178]"00":mp$[178]"00":ms$[178]"00":as$[178]"00"
  136. 1370 ba$[178]"":[141]3020:[141]3030
  137. 1380 hi$[178]"":[153]"loadvalnter left$igh (NULL)emperature:";:[133]hi$
  138. 1390 lo$[178]"":[153]"loadvalnter (NULL)ow (NULL)emperature:";:[133]lo$
  139. 1400 [141]3090:ws$[178]"":[153]"loadvalnter atnverage (NULL)ind (NULL)peed":[133]ws$:ws[178][197](ws$)
  140. 1410 ra$[178]"":[153]"loadvalnter (NULL)recipitation [0.00] inches.":[133]ra$
  141. 1420 mp$[178][196]([197](mp$)[170][197](ra$)):ap$[178][196]([197](ap$)[170][197](ra$))
  142. 1430 sn$[178]"":[153]"loadvalnter (NULL)nowfall to nearest tenth inch.":[133]sn$
  143. 1440 ms$[178][196]([197](ms$)[170][197](sn$)):as$[178][196]([197](as$)[170][197](sn$))
  144. 1450 rh$[178]"":[153]"loadvalnter (NULL)elative left$umidity";:[133]rh$
  145. 1460 cc$[178]"":[153]"loadvalnter lenloud lenover (NULL)ercentage";:[133]cc$
  146. 1470 wc$[178]"":[153]"loadvalnter comment on current (NULL)x lenonditions:"
  147. 1480 [153]"(NULL)imit comments to 40 lenharacters.  ((NULL)ne  full screen line.)
  148. 1490 print"      [196]o not use a [195]omma or [195]olon.      ":print:inputwc$:print"[147]"
  149. 1500 rc$=da$+mo$+yr$+ba$
  150. 1510 rc$=rc$+cr$+left$(bl$,1-len(cr$))
  151. 1520 rc$=rc$+left$(bl$,3-len(hi$))+hi$
  152. 1530 rc$=rc$+left$(bl$,3-len(lo$))+lo$
  153. 1540 rc$=rc$+di$+left$(bl$,1-len(di$))
  154. 1550 rc$=rc$+left$(bl$,3-len(ws$))+ws$
  155. 1560 rc$=rc$+left$(bl$,5-len(ra$))+ra$
  156. 1570 rc$=rc$+left$(bl$,4-len(sn$))+sn$
  157. 1580 rc$=rc$+left$(bl$,3-len(rh$))+rh$
  158. 1590 rc$=rc$+left$(bl$,3-len(cc$))+cc$
  159. 1600 rc$=rc$+wc$+left$(bl$,40-len(wc$))
  160. 1610 rc$=rc$+left$(bl$,5-len(mp$))+mp$
  161. 1620 rc$=rc$+left$(bl$,6-len(ap$))+ap$
  162. 1630 rc$=rc$+left$(bl$,5-len(as$))+as$
  163. 1640 rc$=rc$+left$(bl$,5-len(ms$))+ms$
  164. 1650 rc%=rc%+1:tr%=tr%+1:r=rc%:iftr%=721thentr%=720
  165. 1660 gosub2640:print"     [201]s [196]ata [195]orrect? ([217]es or [206]o)       "
  166. 1670 gosub220:ifg$="n"thenrc%=rc%-1:tr%=tr%-1
  167. 1680 ifg$="n"thenprint"[210]e-enter from start":fort=1to5000:next:goto1270
  168. 1690 ifg$<>"y"then1670
  169. 1700 gosub210:x1=rc%:gosub170:gosub190:gosub200:gosub160
  170. 1710 print#1,rc$:close1:gosub190:print#15,"s0:rc.index":close15
  171. 1720 open1,8,2,"rc.index,s,w"
  172. 1730 print#1,rc%","tr%","hd$","cd$","mp$","ap$","ms$","as$:close1
  173. 1740 ifrc%=1andtr%=1then1770
  174. 1750 no%(rc%)=rc%:in$(rc%)=mid$(rc$,7,5):ifrc%=1andtr%=1then1770
  175. 1760 gosub2520
  176. 1770 ba=val(mid$(rc$,7,5)):cr%=val(mid$(rc$,12,1)):di=val(mid$(rc$,19,1))
  177. 1780 ifpr=1thengosub140
  178. 1790 print"[147]":print"       [199]eneral [211]hort [212]erm [198]orecast      "
  179. 1800 ifba>=30.2andcr%=1anddi>=6anddi<=8then2040
  180. 1810 ifba>=30.2andcr%=2anddi>=6anddi<=8then2050
  181. 1820 ifba>=30.1andba<=30.2andcr%=1anddi>=6anddi<=8then1990
  182. 1830 ifba>=30.1andba<=30.2andcr%=5anddi>=6anddi<=8then2000
  183. 1840 ifba>=30.1andba<=30.2andcr%=2anddi>=6anddi<=8then2020
  184. 1850 ifba>=30.1andba<=30.2andcr%=3anddi>=6anddi<=8then2030
  185. 1860 ifba>=30.1andba<=30.2andcr%=2anddi<=5anddi>=4then2060
  186. 1870 ifba>=30.1andba<=30.2andcr%=3anddi=5ordi=4then2070
  187. 1880 ifba>=30.1andba<=30.2andcr%=2anddi<=4anddi>=2then2090
  188. 1890 ifba>=30.1andba<=30.2andcr%=3anddi<=4anddi>=2then2100
  189. 1900 ifba<=29.8andcr%=2anddi>=2anddi<=3then2140
  190. 1910 ifba<=29.8andcr%=3anddi<=5anddi>=3then2230
  191. 1920 ifba<=29.8andcr%=3anddi<=3anddi>=1then2260
  192. 1930 ifba<=29.8andcr%=5then2290
  193. 1940 ifba<=30.1andcr%=3anddi>=4anddi<=8then2180
  194. 1950 ifba<=30.1andcr%=4anddi<=6anddi>=5then2200
  195. 1960 ifba<=30.1andcr%=2anddi>=2anddi<=3then2110
  196. 1970 ifba<=30.1andcr%=2anddi=4then2170
  197. 1980 print"[204]ittle change during next 24 hours.":goto2300
  198. 1990 print"[198]air, with little temperature change fornext day or two.":goto2300
  199. 2000 print"[198]air today, warmer with a chance of some";
  200. 2010 print"rain within 2 days.":goto2300
  201. 2020 print"[212]urning warmer, with rain likely in 24  to 36 hours.":goto2300
  202. 2030 print"[215]armer, with rain in 18-36 hours.":goto2300
  203. 2040 print"[195]ontinued fair with little change in    temperature.":goto2300
  204. 2050 print"[198]air, with slowly rising temperatures   for next 2 days.":goto2300
  205. 2060 print"[208]recipitation likely within 24 [200]ours.":goto2300
  206. 2070 print"[201]ncreasing winds, [208]recipitation likely
  207. 2080 [153]"within 12-24 hours.":[137]2300
  208. 2090 [153]"(NULL)ain within 12-18 hours.":[137]2300
  209. 2100 [153]"peekecoming windy with rain likely within  12-24 hours.":[137]2300
  210. 2110 [153]"right$n (NULL)inter,  (NULL)recipitation likely within 24 hours.
  211. 2120 print"[201]n [211]ummer, [195]loudy with light breezes.   [210]ain likely in a day or two.
  212. 2130 [137]2300
  213. 2140 [153]"right$n (NULL)ummer, (NULL)ain likely within 24 hours.
  214. 2150 print"[201]n [215]inter, [210]ain or [211]now likely, winds   increasing.
  215. 2160 [137]2300
  216. 2170 [153]"(NULL)ore (NULL)ain for next day or two.":[137]2300
  217. 2180 [153]"left$igh winds and possible heavy rain today";
  218. 2190 [153]"lenlearing and cooler tomorrow.":[137]2300
  219. 2200 [153]"lenlearing within a few hours.  ascair
  220. 2210 print"weather for next several days.
  221. 2220 [137]2300
  222. 2230 [153]" (NULL)evere (NULL)torm (NULL)arning!
  223. 2240 print"[215]indy with heavy precipitation today.
  224. 2250 [153]"lenlearing and turning cooler tomorrow.":[153]"":[137]2300
  225. 2260 [153]"(NULL)evere northeast gales, with heavy rain or snow.
  226. 2270 print"[212]urning cooler in [215]inter.
  227. 2280 [137]2300
  228. 2290 [153]"lenlearing and cooler.
  229. 2300 ifpr=1thengosub150
  230. 2310 gosub2350:iftr%=1thencl=0:gosub2580:goto2330
  231. 2320 gosub2380
  232. 2330 ifcl=0thenprint"     [206]o [193]dditional [196]ata [193]vailable":goto2350
  233. 2340 print"   [211]imiliar [196]ata found in [198]ile":gosub2350:gosub3290:print"[145][145]"
  234. 2350 close15:gosub210:close15
  235. 2360 print"       [208]ress any key to continue        ";
  236. 2370 gosub220:print"[147]":return
  237. 2380 cl=0:a=0:u=1:ifrc%=1andtr%=1then2520
  238. 2390 u=0:fort=1totr%:ift=rc%then2410
  239. 2400 ifba$=in$(t)andno%(t)<>rc%thenu=u+1:ho%(u)=no%(t)
  240. 2410 next:ifu=0then2510
  241. 2420 t=0:c=0:gosub210:gosub200
  242. 2430 t=t+1:rc$="":ift>uthen2510
  243. 2440 x1=ho%(t):gosub170
  244. 2450 gosub160:fora=1to19:get#1,a$
  245. 2460 rc$=rc$+a$:next
  246. 2470 ifcr$<>mid$(rc$,12,1)then2430
  247. 2480 ifdi$<>mid$(rc$,19,1)then2430
  248. 2490 c=c+1:d%(c)=ho%(c)
  249. 2500 cl=1:gosub240:return
  250. 2510 cl=0:gosub240:return
  251. 2520 gosub210:open1,8,2,"ba.index,s,r"
  252. 2530 forp=1totr%:input#1,no%(p),in$(p):next:gosub240
  253. 2540 fori=1totr%:ifi=rc%theni=i+1
  254. 2550 forj=itotr%:ifin$(i)<in$(j)then2570
  255. 2560 hi$=in$(i):in$(i)=in$(j):in$(j)=hi$:ni=no%(i):no%(i)=no%(j):no%(j)=ni
  256. 2570 next:next
  257. 2580 gosub210:print#15,"s0:ba.index"
  258. 2590 iftr%=1thenno%(1)=rc%:in$(1)=str$(ba)
  259. 2600 open1,8,2,"ba.index,s,w":i=0
  260. 2610 i=i+1:ifi>tr%then2630
  261. 2620 print#1,no%(i):print#1,in$(i):goto2610
  262. 2630 gosub240:print"[147]":return
  263. 2640 ifpr=1thengosub140
  264. 2650 print"[147][210]ecord#[146]"r;"[196]ata [197]ntry for:[146]";
  265. 2660 printmid$(rc$,3,2);"/";mid$(rc$,1,2);"/";mid$(rc$,5,2)
  266. 2670 print"[194]arometric [208]ressure........ ";mid$(rc$,7,5)"inches"
  267. 2680 print"[200]igh [212]emperature...........";:hi$=mid$(rc$,13,3)
  268. 2690 printval(hi$)"[196]eg. [198]"
  269. 2700 print"      [206]ormal [200]igh..........";mh(val(mid$(rc$,3,2)))"[196]eg. [198]"
  270. 2710 print"[204]ow [212]emperature............";:lo$=mid$(rc$,16,3)
  271. 2720 printval(lo$)"[196]eg. [198]"
  272. 2730 print"      [206]ormal [204]ow...........";ml(val(mid$(rc$,3,2)))"[196]eg. [198]"
  273. 2740 print"[215]ind [196]irection............. ";
  274. 2750 wd=val(mid$(rc$,19,1)):printdi$(wd)
  275. 2760 print"[215]ind [211]peed.................";val(mid$(rc$,20,3));"[205][208][200]"
  276. 2770 print"[210]ainfall (past 24 [200]rs).....";val(mid$(rc$,23,5))"inches"
  277. 2780 print"      [206]ormal [205]onthly [210]ain..";ar(val(mid$(rc$,3,2)));"inches"
  278. 2790 print"      [205]onthly [210]ain to date.";val(mid$(rc$,79,5))"inches"
  279. 2800 print"      [217]early [210]ain to date..";val(mid$(rc$,83,6))"inches"
  280. 2810 print"[211]nowfall (past 24 [200]rs).....";val(mid$(rc$,28,4))"inches"
  281. 2820 print"      [206]ormal [205]onthly [211]now..";as(val(mid$(rc$,3,2)))"inches"
  282. 2830 print"      [205]onthly [211]now to date.";val(mid$(rc$,89,5))"inches"
  283. 2840 print"      [217]early [211]now to date..";val(mid$(rc$,94,6))"inches"
  284. 2850 print"[210]elative [200]umidity..........";val(mid$(rc$,32,3));"%"
  285. 2860 print"[208]ercent [195]loud [195]over........";val(mid$(rc$,35,3));"%"
  286. 2870 hi=val(hi$):lo=val(lo$):hd=65-int((hi+lo)/2)
  287. 2880 td=(hi+lo)/2:rh=val(mid$(rc$,32,3)):rh=rh/100
  288. 2890 ifsgn(hd)=-1then2930
  289. 2900 z=val(hd$)+hd:hd$=str$(z):print"[200]eating [196]egree [196]ays........";hd
  290. 2910 iff=1then2970
  291. 2920 print"      [212]otal for [211]eason.....";hd$:goto2970
  292. 2930 cd=(int(hi+lo)/2)-65:ifsgn(cd)=-1then2970
  293. 2940 z=val(cd$)+cd:cd$=str$(z):print"[195]ooling [196]egree [196]ays........";cd
  294. 2950 iff=1then2970
  295. 2960 print"      [212]otal for [211]eason.....";cd$
  296. 2970 printmid$(rc$,38,40);
  297. 2980 ifpr=1thengosub150
  298. 2990 return
  299. 3000 print"[147]          [198]orecast [215]eather
  300. 3010 [141]3020:[141]3030:[141]3090:[153]"load":[141]1780:[142]
  301. 3020 [153]"loadvalnter:":[153]"peekarometric (NULL)ressure":[133]ba$:ba[178][197](ba$):[142]
  302. 3030 [153]"load(NULL)ate of lenhange: "
  303. 3040 [153]"(NULL)apid lenhange is any change greater than 0.06 inches per hour.
  304. 3050 print"[197]nter:":print" 1.[146]  [211]teady"tab(20)" 4.[146]  [211]lowly [210]ising"
  305. 3060 print" 2.[146]  [198]alling [211]lowly"tab(20)" 5.[146]  [210]ising [210]apidly"
  306. 3070 print" 3.[146]  [198]alling [210]apidly":print
  307. 3080 cr$="":inputcr$:cr%=val(cr$):return
  308. 3090 print"[147][197]nter [206]umber for [215]ind [196]irection:
  309. 3100 [153]" 1.wait (NULL)orth"[163]20)" 5.wait (NULL)outh
  310. 3110 print" 2.[146] [206]ortheast"tab(20)" 6.[146] [211]outhwest
  311. 3120 [153]" 3.wait valast"[163]20)" 7.wait (NULL)est
  312. 3130 print" 4.[146] [211]outheast"tab(20)" 8.[146] [206]orthwest
  313. 3140 di$[178]"":[153]:[133]di$:di[178][197](di$):[142]
  314. 3150 [153]"load         str$egree str$ay (NULL)egisters
  315. 3160 print"[200]eating [196]egree [196]ays: ";hd$
  316. 3170 print"[195]ooling [196]egree [196]ays: ";cd$
  317. 3180 printtab(5)"[212]otals as of last entry.
  318. 3190 [153]"       1.wait  lenlear left$eating str$egree str$ays
  319. 3200 print"       2.[146]  [195]lear [195]ooling [196]egree [196]ays
  320. 3210 [153]"       3.wait  (NULL)eturn to (NULL)ain (NULL)enu
  321. 3220 gosub220:ifg$="3"thenreturn
  322. 3230 ifg$="1"thenhd$="00":goto3260
  323. 3240 ifg$="2"thencd$="00":goto3260
  324. 3250 goto3220
  325. 3260 gosub210:print#15,"s0:rc*":close15:open1,8,2,"rc.index,s,w"
  326. 3270 print#1,rc%","tr%","hd$","cd$","mp$","ap$","ms$","as$:close1:return
  327. 3280 end
  328. 3290 f=1:forx=1toc
  329. 3300 ifd%(x)=tr%+1andtr%<720thenreturn
  330. 3310 x1=d%(x):gosub170:gosub210:gosub200
  331. 3320 gosub160:gosub180
  332. 3330 r=d%(x):ifr=rc%then3370
  333. 3340 ifr=0then3370
  334. 3350 gosub2640:gosub2350:gosub240:y=y+1:ify<4thend%(x)=d%(x)+1:goto3300
  335. 3360 ifd%(x)+3<d%(x+3)thenx=x+4
  336. 3370 next
  337. 3380 print"                [197]nd of [198]ile":gosub240:f=0:return
  338. 3390 rem high temperature data
  339. 3400 data47.6,50.8,59.3,70.7,77.9,84.2
  340. 3410 data87.4,86.2,80.4,70.1,59.9,50.4
  341. 3420 rem low temperature data
  342. 3430 data27.3,29.0,36.5,45.9,55.0,62.6
  343. 3440 data66.9,66.3,59.3,46.7,37.1,29.9
  344. 3450 rem monthly precipitation data
  345. 3460 data3.32,3.30,3.77,3.17,3.61,3.81
  346. 3470 data4.57,4.21,3.65,3.00,2.74,3.31
  347. 3480 rem monthly snowfall data
  348. 3490 data3.2,2.4,1.9,.1,0,0,0,0,0,0,.2,1.4
  349. 3500 data"[206]orth","[206]ortheast","[197]ast","[211]outheast","[211]outh","[211]outhwest"
  350. 3510 data"[215]est","[206]orthwest"
  351.